﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TZReport_Util.Basic;
using TZReport_Util.YY;
using TZRerport_Dal.IDal;
using TZRerport_Dal.YY;

namespace TZReport_Service.Config
{
    public sealed class HospitalConfigManager
    {
        #region 请求的信息
        public static readonly string HosName = string.Empty;
        #endregion
        public static readonly string baseUrl = string.Empty;
        public static readonly string client = string.Empty;
        public static readonly string hospitalBM = string.Empty;
        public static readonly string hospitalName = string.Empty;
        public static readonly string hospitalAddress = string.Empty;
        public static readonly string pdfBaseUrl = string.Empty;
        public static readonly string absPath = string.Empty;
        public static readonly ISql isql = null;
        static HospitalConfigManager()
        {
            HosName = ConfigManager.hosName;
            switch (HosName)
            {
                case "LinHaiDRRMYY": // 临海二院
                    baseUrl = LinHaiDRRMYY.Url;
                    client = LinHaiDRRMYY.Client;
                    hospitalBM = LinHaiDRRMYY.Hid;
                    hospitalName = LinHaiDRRMYY.HosName;
                    hospitalAddress = LinHaiDRRMYY.HosAddress;
                    pdfBaseUrl = LinHaiDRRMYY.PdfBaseUrl;
                    absPath = LinHaiDRRMYY.AbsPath;
                    isql = new LinHaiDRRMYYDal();
                    break;
                case "LinHaiDYRMYY": // 临海一院
                    baseUrl = LinHaiDYRMYY.Url;
                    client = LinHaiDYRMYY.Client;
                    hospitalBM = LinHaiDYRMYY.Hid;
                    hospitalName = LinHaiDYRMYY.HosName;
                    hospitalAddress = LinHaiDYRMYY.HosAddress;
                    pdfBaseUrl = LinHaiDYRMYY.PdfBaseUrl;
                    absPath = LinHaiDYRMYY.AbsPath;
                    isql = new LinHaiDYRMYYDal();
                    break;
                case "TaiZhouSL": // 台州市立
                    baseUrl = TaiZhouSL.Url;
                    client = TaiZhouSL.Client;
                    hospitalBM = TaiZhouSL.Hid;
                    hospitalName = TaiZhouSL.HosName;
                    hospitalAddress = TaiZhouSL.HosAddress;
                    pdfBaseUrl = TaiZhouSL.PdfBaseUrl;
                    absPath = TaiZhouSL.AbsPath;
                    isql = new TaiZhouSLDal();
                    break;
                case "TianTaiXRMYY": // 天台县人民医院
                    baseUrl = TianTaiXRMYY.Url;
                    client = TianTaiXRMYY.Client;
                    hospitalBM = TianTaiXRMYY.Hid;
                    hospitalName = TianTaiXRMYY.HosName;
                    hospitalAddress = TianTaiXRMYY.HosAddress;
                    pdfBaseUrl = TianTaiXRMYY.PdfBaseUrl;
                    absPath = TianTaiXRMYY.AbsPath;
                    isql = new TianTaiXRMYYDal();
                    break;
                case "TianTaiZYY": // 天台县中医院
                    baseUrl = TianTaiZYY.Url;
                    client = TianTaiZYY.Client;
                    hospitalBM = TianTaiZYY.Hid;
                    hospitalName = TianTaiZYY.HosName;
                    hospitalAddress = TianTaiZYY.HosAddress;
                    pdfBaseUrl = TianTaiZYY.PdfBaseUrl;
                    absPath = TianTaiZYY.AbsPath;
                    isql = new TianTaiZYYDal();
                    break;
                default:
                    new Exception("没指定医院");
                    break;
            }
        }
    }
}
